use QcUI::component::UiNode;

use super::{ComponentState, InspectorContext, InspectorTrait};

pub mod button;
pub mod grid;
pub mod image;
pub mod label;
pub mod panel;
pub mod textbox;
pub mod widget;

impl InspectorTrait for UiNode {
    fn inspector(&mut self, ctx: &mut InspectorContext, state: &mut ComponentState) {
        match self {
            UiNode::Button(node) => node.inspector(ctx, state),
            UiNode::Grid(node) => node.inspector(ctx, state),
            UiNode::Panel(node) => node.inspector(ctx, state),
            UiNode::Label(node) => node.inspector(ctx, state),
            UiNode::TextBox(node) => node.inspector(ctx, state),
            UiNode::Image(node) => todo!(),
            UiNode::Other(node) => todo!(),
        }
    }
}
